<?php

class Application_Form_RacksAsignar extends Sgit_Form
{

    public function init_form()
    {
/*
         $proyecto=new Sgit_Form_Element_Select_Proyectos('id_proyecto');
         $this->addElement($proyecto);  
         */
         
         $request= Zend_Controller_Front::getInstance()->getRequest();
         $id=$request->getParam('id');
         
         if(!$id)
         {
            $rack=new Sgit_Form_Element_Select_RacksLibres('id_rack');
            $this->addElement($rack);
         }
          
         
         $sala=new Sgit_Form_Element_Select_Salas('id_sala');
         $this->addElement($sala);  
         
         
         $huella=new Zend_Form_Element_Text('huella');
         $huella ->setLabel('Huella')
                ->addFilter('StringTrim')
                ->addValidator('StringLength', false,array(0, 10));
         $this->addElement($huella);  
         
      
         $this->setElementDecorators(array(
    		    'ViewHelper',
    		   'Errors',
    		    array(array('data' => 'HtmlTag'),	array('tag' => 'td', 'class' => 'element')   ),
    		    array('Label', array('tag' => 'td')),
    		    array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
    	 ));
           
       
   

        
    }
}
